package cn.kgc.alibaba.controller;

import cn.kgc.alibaba.client.NacosClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/4/26
 * @Description:
 */
@RestController
@RequestMapping("open")
@RefreshScope
public class OpenfeignController {

    @Value("${age}")
    private Integer age;
    @Autowired
    private NacosClient nacosClient;

    @RequestMapping("m1")
    public String method1(){

        String s = nacosClient.method1();

        return "OpenfeignController ok "+s +" age="+age;
    }
}
